package com.exam.service.impl;


import com.exam.mapper.PaperManageMapper;
import com.exam.mapper.PaperMapper;
import com.exam.po.PaperManage;
import com.exam.service.PaperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName PaperServiceImpl
 * @Description TODO
 * @action luoliang
 * @Data 2021/1/14 14:22
 * @Version 1.0
 */
@Service
public class PaperServiceImpl implements PaperService {

    @Autowired
    private PaperManageMapper paperManageMapper;

    /**
     * 添加
     * @param record
     * @return
     */
    @Override
    public int insert(PaperManage record) {
        return paperManageMapper.insert(record);
    }

    /**
     * 查询全部
     * @return
     */
    @Override
    public List<PaperManage> findAll() {

        return paperManageMapper.selectAll();
    }

    /**
     * 根据ID查询
     * @param paperId
     * @return
     */
    @Override
    public List<PaperManage> findById(Integer paperId) {
        return paperManageMapper.selectById(paperId);
    }
}
